<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <title>05_面试题</title>
    <link rel="stylesheet" href="xxx.css">
    <style>

    </style>
  </head>

  <body>
    <script type="text/javascript">
      /*
   测试题1:  先执行变量提升, 再执行函数提升
   */
      function a() {}
      var a
      console.log(typeof a) // 'function'


      /*
       测试题2:变量预处理, in操作符
       */
      if (!(b in window)) {
        var b = 1
      }
      console.log(b) // undefined

      /*
       测试题3:预处理, 顺序执行
       */
      var c = 1

      function c(c) {
        console.log(c);
        var c = 3
      }
      c(2) // 报错
    </script>
  </body>

</html>